<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Add Room</title>
</h:head>
<f:view>
	<h:body>
		<ui:composition template="../includes/template.xhtml">
			<ui:define name="mainbody">
				<center>
					<h:form>
						<p:panel header="Add Room" style="min-height: 550px"
							styleClass="prime_panel">
							<p:growl id="growl" showDetail="true" sticky="false"
								autoUpdate="true" showSummary="false" />
							<center>
								<table border="0" cellpadding="4px" cellspacing="8px">

									<tr>
										<td><h:outputText value="Room Title: " /><h:outputText value="*" style="color:red"/></td>
										<td><p:inputText id="roomTitle"
												value="#{roomBean.room.roomTitle}" required="true" requiredMessage="Please enter Room Title" >
												<f:ajax execute="@this" event="blur" />
												</p:inputText>
										</td>
									</tr>

									<tr>
										<td><h:outputText value="Available for Classes: " /></td>

										<td><p:selectOneRadio
												id="genderOptions" value="#{roomBean.room.status}" style="width:160">
												<f:selectItem itemLabel="Yes" itemValue="true"  />
											
												<f:selectItem itemLabel="No" itemValue="false" />
											</p:selectOneRadio>
										</td>
									</tr>

									<tr>
										<td><h:outputText value="Route: " /><h:outputText value="*" style="color:red"/></td>
										<td><p:inputText id="route"
												value="#{roomBean.room.route}"  required="true" requiredMessage="Please enter Route" >
											<f:ajax execute="@this" event="blur" />
												</p:inputText>
										</td>
									</tr>



									<tr>
										<td><h:outputText value="Capacity :" /><h:outputText value="*" style="color:red"/></td>
										<td><p:tooltip for="capacity" showEvent="focus" hideEvent="blur" />
										<p:inputText id="capacity"
												value="#{roomBean.room.capacity}"  title="Please give value in terms of Numbers like 30 , 40 , 50 etc" required="true" requiredMessage="Please enter the Capacity" />
										</td>
									</tr>
									<tr>
										<td><h:outputText value="Description :" /></td>
										<td><p:inputTextarea id="desc"
												rows="5" cols="20" value="#{roomBean.room.description}" />
										</td>
									</tr>
									<tr>
										<td></td>
										<td style="text-align: right"><p:spacer width="5" /> <p:commandButton
												id="submit" value="Submit" type="submit" ajax="false"
												action="#{roomBean.performAction}" />
										</td>
									</tr>
								</table>
							</center>
						</p:panel>
					</h:form>
				</center>
			</ui:define>
		</ui:composition>
	</h:body>
</f:view>
</html>
